<!DOCTYPE html>
<html lang="en">
{% if messages %}
    <script>
        {% for message in messages %}
            alert(('{{ message }}'))
        {%endfor %}
    </script>
{% endif %}
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>美食数据分析可视化</title>

	<!-- ================= Favicon ================== -->
    <!-- Standard -->
    <link rel="shortcut icon" href="http://placehold.it/64.png/000/fff">
    <!-- Retina iPad Touch Icon-->
    <link rel="apple-touch-icon" sizes="144x144" href="http://placehold.it/144.png/000/fff">
    <!-- Retina iPhone Touch Icon-->
    <link rel="apple-touch-icon" sizes="114x114" href="http://placehold.it/114.png/000/fff">
    <!-- Standard iPad Touch Icon-->
    <link rel="apple-touch-icon" sizes="72x72" href="http://placehold.it/72.png/000/fff">
    <!-- Standard iPhone Touch Icon-->
    <link rel="apple-touch-icon" sizes="57x57" href="http://placehold.it/57.png/000/fff">

	<!-- Styles -->
    <link href="/static/assets/css/lib/font-awesome.min.css" rel="stylesheet">
    <link href="/static/assets/css/lib/themify-icons.css" rel="stylesheet">
    <link href="/static/assets/css/lib/owl.carousel.min.css" rel="stylesheet" />
    <link href="/static/assets/css/lib/owl.theme.default.min.css" rel="stylesheet" />
    <link href="/static/assets/css/lib/weather-icons.css" rel="stylesheet" />
    <link href="/static/assets/css/lib/mmc-chat.css" rel="stylesheet" />
    <link href="/static/assets/css/lib/sidebar.css" rel="stylesheet">
    <link href="/static/assets/css/lib/bootstrap.min.css" rel="stylesheet">
    <link href="/static/assets/css/lib/simdahs.css" rel="stylesheet">
    <link href="/static/assets/css/style.css" rel="stylesheet">


</head>

<body>

    <div class="sidebar sidebar-hide-to-small sidebar-shrink sidebar-gestures">
        <div class="nano">
            <div class="nano-content">
                <div class="nano-content">
                    <style>
                        .newUl li {
                            font-size: 19px;
                        }
                    </style>

                </div>
                <ul class="newUl">
					<li class="label">主页</li>
                    <li class=""><a href="/foodApp/index/"><i class="ti-home"></i> 首页 </a></li>


                    <li><a href="/foodApp/selfInfo/"><i class="ti-user"></i> 个人信息</a></li>



					<li class="label">数据分析</li>
					<li><a href="/foodApp/table/"><i class="ti-layout"></i> 数据总览</a>

                    </li>
					<li><a href="/foodApp/typeChart/"><i class="ti-panel"></i> 类型分析</a>

                    </li>


					<li class="active"><a href="/foodApp/priceChart/"><i class="ti-money"></i> 价格分析</a>
                    </li>

					<li><a href="/foodApp/rateChart/"><i class="ti-comment"></i> 评价分析</a>

                    </li>
{#                    <li><a href="/foodApp/areaChart/"><i class="ti-map"></i> 地区分析</a>#}
{##}
{#                    </li>#}
                    <li><a href="/foodApp/foodCloud/"><i class="ti-cloud"></i> 美食词云图</a>

                    </li>

					<li class="label">预测</li>
					<li class="" ><a href="/foodApp/preChart/"><i class="ti-view-list-alt"></i> 评价预测  </a></li>



                </ul>
            </div>
        </div>
    </div><!-- /# sidebar -->

    <div class="header">
        <div class="pull-left">
            <div class="logo" id="sideLogo">
                <a href="index.html">
{#                    <img class="full-logo" src="/static/assets/images/logo-big.png" alt="SimDahs">#}
{#                    <img class="small-logo" src="/static/assets/images/logo-small.png" alt="SimDahs">#}
                    <span>美食数据分析可视化</span>
                </a>
            </div>
            <div class="hamburger sidebar-toggle">
                <span class="ti-menu"></span>
            </div>
        </div>

        <div class="pull-right p-r-15">
            <ul>
                <li class="header-icon dib"><i class="ti-bell"></i>
                    <div class="drop-down">
                        <div class="dropdown-content-heading">
                            <span class="text-left">Recent Notifications</span>
                        </div>
                        <div class="dropdown-content-body">
                            <ul>
                                <li>
                                    <a href="#">
                                        <img class="pull-left m-r-10 avatar-img" src="/static/assets/images/avatar/3.jpg" alt="" />
                                        <div class="notification-content">
                                            <small class="notification-timestamp pull-right">02:34 PM</small>
                                            <div class="notification-heading">Mr. Wolf</div>
                                            <div class="notification-text">5 members joined today </div>
                                        </div>
                                    </a>
                                </li>

                                <li>
                                    <a href="#">
                                        <img class="pull-left m-r-10 avatar-img" src="/static/assets/images/avatar/3.jpg" alt="" />
                                        <div class="notification-content">
                                            <small class="notification-timestamp pull-right">02:34 PM</small>
                                            <div class="notification-heading">Sofiya</div>
                                            <div class="notification-text">likes a photo of you</div>
                                        </div>
                                    </a>
                                </li>

                                <li>
                                    <a href="#">
                                        <img class="pull-left m-r-10 avatar-img" src="/static/assets/images/avatar/3.jpg" alt="" />
                                        <div class="notification-content">
                                            <small class="notification-timestamp pull-right">02:34 PM</small>
                                            <div class="notification-heading">Richard</div>
                                            <div class="notification-text">Hi Teddy, Just wanted to let you ...</div>
                                        </div>
                                    </a>
                                </li>

                                <li>
                                    <a href="#">
                                        <img class="pull-left m-r-10 avatar-img" src="/static/assets/images/avatar/3.jpg" alt="" />
                                        <div class="notification-content">
                                            <small class="notification-timestamp pull-right">02:34 PM</small>
                                            <div class="notification-heading">Sara Maggi</div>
                                            <div class="notification-text">Hi Teddy, Just wanted to let you ...</div>
                                        </div>
                                    </a>
                                </li>
                                <li class="text-center">
                                    <a href="#" class="more-link">See All</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li class="header-icon dib"><i class="ti-email"></i>
                    <div class="drop-down">
                        <div class="dropdown-content-heading">
                            <span class="text-left">2 New Messages</span>
                            <a href="email.html"><i class="ti-pencil-alt pull-right"></i></a>
                        </div>
                        <div class="dropdown-content-body">
                            <ul>
                                <li class="notification-unread">
                                    <a href="#">
                                        <img class="pull-left m-r-10 avatar-img" src="/static/assets/images/avatar/1.jpg" alt="" />
                                        <div class="notification-content">
                                            <small class="notification-timestamp pull-right">02:34 PM</small>
                                            <div class="notification-heading">John Doe</div>
                                            <div class="notification-text">Hi Teddy, Just wanted to let you ...</div>
                                        </div>
                                    </a>
                                </li>

                                <li class="notification-unread">
                                    <a href="#">
                                        <img class="pull-left m-r-10 avatar-img" src="/static/assets/images/avatar/2.jpg" alt="" />
                                        <div class="notification-content">
                                            <small class="notification-timestamp pull-right">02:34 PM</small>
                                            <div class="notification-heading">Sara Maggi</div>
                                            <div class="notification-text">Hi Teddy, Just wanted to let you ...</div>
                                        </div>
                                    </a>
                                </li>

                                <li>
                                    <a href="#">
                                        <img class="pull-left m-r-10 avatar-img" src="/static/assets/images/avatar/3.jpg" alt="" />
                                        <div class="notification-content">
                                            <small class="notification-timestamp pull-right">02:34 PM</small>
                                            <div class="notification-heading">John Doe</div>
                                            <div class="notification-text">Hi Teddy, Just wanted to let you ...</div>
                                        </div>
                                    </a>
                                </li>

                                <li>
                                    <a href="#">
                                        <img class="pull-left m-r-10 avatar-img" src="/static/assets/images/avatar/2.jpg" alt="" />
                                        <div class="notification-content">
                                            <small class="notification-timestamp pull-right">02:34 PM</small>
                                            <div class="notification-heading">Sara Maggi</div>
                                            <div class="notification-text">Hi Teddy, Just wanted to let you ...</div>
                                        </div>
                                    </a>
                                </li>
                                <li class="text-center">
                                    <a href="#" class="more-link">See All</a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
				<li class="header-icon dib chat-sidebar-icon"><i class="ti-comment"></i></li>
                <li class="header-icon dib"><img class="avatar-img" src="/static/assets/images/avatar/1.jpg" alt="" /> <span class="user-avatar">Wolf <i class="ti-angle-down f-s-10"></i></span>
                    <div class="drop-down dropdown-profile">
                        <div class="dropdown-content-heading">
                            <span class="text-left">{{ userInfo.username }}</span>
                        </div>
                        <div class="dropdown-content-body">
                            <ul>
                                <li><a href="/foodApp/selfInfo/"><i class="ti-user"></i> <span>个人信息</span></a></li>
                                <li><a href="/foodApp/login/"><i class="ti-power-off"></i> <span>退出登录</span></a></li>
                            </ul>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>

	<div class="chat-sidebar">
        <!-- BEGIN chat -->
        <div id="mmc-chat" class="color-default">
            <!-- BEGIN CHAT BOX -->
            <div class="chat-box">
                <!-- BEGIN CHAT BOXS -->
                <ul class="boxs"></ul>
                <!-- END CHAT BOXS -->
                <div class="icons-set">
                    <div class="stickers">
                        <div class="had-container">
                            <div class="row">
                                <div class="s12">
                                    <ul class="tabs" style="width: 100%;height: 60px;">
                                        <li class="tab col s3">
                                            <a href="#tab1" class="active">
                                                <img src="images/1.png" alt="" />
                                            </a>
                                        </li>
                                        <li class="tab col s3"><a href="#tab2">Test 2</a></li>
                                    </ul>
                                </div>
                                <div id="tab1" class="s12 tab-content">
                                    <ul>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                        <li><img src="images/1.png" alt="" /></li>
                                    </ul>
                                </div>
                                <div id="tab2" class="s12 tab-content">Test 2</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- END CHAT BOX -->
            <!-- BEGIN SIDEBAR -->
            <div id="sidebar" class="right scroll">
                <div class="had-container">
                    <!-- BEGIN USERS -->
                    <div class="users">

                        <ul class="user-list">
                            <!-- BEGIN USER-->
                            <li class="user-tooltip" data-id="1" data-status="online" data-username="Rufat Askerov" data-position="left" data-filter-item data-filter-name="rufat askerov">
                                <!-- BEGIN USER IMAGE-->
                                <div class="user-image">
                                    <img src="/static/assets/images/avatar/1.jpg" class="avatar" alt="Rufat Askerov" />
                                </div>
                                <!-- END USER IMAGE-->
                                <!-- BEGIN USERNAME-->
                                <span class="user-name">Rufat Askerov</span>
								<span class="user-show"></span>
                                <!-- END USERNAME-->
                            </li>
                            <!-- END USER-->
                            <!-- BEGIN USER-->
                            <li class="user-tooltip" data-id="3" data-status="online" data-username="Alice" data-position="left" data-filter-item data-filter-name="alice">
                                <div class="user-image">
                                    <img src="/static/assets/images/avatar/1.jpg" class="avatar" alt="Alice" />
                                </div>
                                <span class="user-name">Alice</span>
								<span class="user-show"></span>
                            </li>

                            <!-- BEGIN USER-->
                            <li class="user-tooltip" data-id="7" data-status="offline" data-username="Michael Scofield" data-position="left" data-filter-item data-filter-name="michael scofield">
                                <div class="user-image">
                                    <img src="/static/assets/images/avatar/1.jpg" class="avatar" alt="Michael Scofield" />
                                </div>
                                <span class="user-name">Michael Scofield</span>
								<span class="user-show"></span>
                            </li>

                            <!-- BEGIN USER-->
                            <li class="user-tooltip" data-id="5" data-status="online" data-username="Irina Shayk" data-position="left" data-filter-item data-filter-name="irina shayk">
                                <div class="user-image">
                                    <img src="/static/assets/images/avatar/1.jpg" class="avatar" alt="Irina Shayk" />
                                </div>
                                <span class="user-name">Irina Shayk</span>
								<span class="user-show"></span>
                            </li>

                            <!-- BEGIN USER-->
                            <li class="user-tooltip" data-id="6" data-status="offline" data-username="Sara Tancredi" data-position="left" data-filter-item data-filter-name="sara tancredi">
                                <div class="user-image">
                                    <img src="/static/assets/images/avatar/1.jpg" class="avatar" alt="Sara Tancredi" />
                                </div>
                                <span class="user-name">Sara Tancredi</span>
								<span class="user-show"></span>
                            </li>

                            <!-- BEGIN USER-->
                            <li class="user-tooltip" data-id="7" data-status="offline" data-username="Wolf" data-position="left" data-filter-item data-filter-name="Wolf">
                                <div class="user-image">
                                    <img src="/static/assets/images/avatar/1.jpg" class="avatar" alt="Wolf" />
                                </div>
                                <span class="user-name">Wolf</span>
								<span class="user-show"></span>
                            </li>
                        </ul>
						<div class="chat-user-search">
							<div class="input-group">
								<span class="input-group-addon"><i class="ti-search"></i></span>
								<input type="text" class="form-control" placeholder="Search"  data-search />
							</div>
						</div>
                    </div>
                    <!-- END USERS -->

                </div>
            </div>
            <!-- END SIDEBAR -->
        </div>
        <!-- END chat -->
    </div>
    <!-- END chat Sidebar-->

    <div class="content-wrap">
        <div class="main">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-lg-8 p-0">
                        <div class="page-header">
                            <div class="page-title">
                                <h1>价格分析</h1>
                            </div>
                        </div>
                    </div><!-- /# column -->
                    <div class="col-lg-4 p-0">
                        <div class="page-header">
                            <div class="page-title">
                                <ol class="breadcrumb text-right">
                                    <li><a href="#">数据分析</a></li>
                                    <li class="active">价格分析</li>
                                </ol>
                            </div>
                        </div>
                    </div><!-- /# column -->
                </div><!-- /# row -->
                <div class="main-content">
					<div class="row">
                        <!-- /# column -->
                    <div class="row">
						<div class="col-lg-6">
							<div class="card alert">
                                <div class="card-header">
                                    <h4>城市价格最大值分析</h4>
                                    <div class="card-header-right-icon">
                                        <ul>
                                            <li class="card-close" data-dismiss="alert"><i class="ti-close"></i></li>
                                            <li class="doc-link"><a href="#"><i class="ti-link"></i></a></li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="card-body">
                                    <div id="mainB" style="height: 360px;width: 100%"></div>
                                </div>
                            </div>
								</div>

                    <div class="row">
						<div class="col-lg-6">
							<div class="card alert">
                                <div class="card-header">
                                    <h4>类型价格平均值分析</h4>
                                    <div class="card-header-right-icon">
                                        <ul>
                                            <li class="card-close" data-dismiss="alert"><i class="ti-close"></i></li>
                                            <li class="doc-link"><a href="#"><i class="ti-link"></i></a></li>
                                        </ul>
                                    </div>
                                </div>
                                <div class="card-body">
                                    <div id="mainC" style="height: 360px;width: 100%"></div>
                                </div>
                            </div>
                </div>
            </div><!-- /# container-fluid -->
        </div><!-- /# main -->
    </div><!-- /# content wrap -->


    <script src="/static/assets/js/lib/jquery.min.js"></script><!-- jquery vendor -->
    <script src="/static/assets/js/lib/jquery.nanoscroller.min.js"></script><!-- nano scroller -->
    <script src="/static/assets/js/lib/sidebar.js"></script><!-- sidebar -->
    <script src="/static/assets/js/lib/bootstrap.min.js" rel="stylesheet"></script><!-- bootstrap -->
    <script src="/static/assets/js/lib/mmc-common.js"></script>
    <script src="/static/assets/js/lib/mmc-chat.js"></script>
	<!--  Chart js -->
	<script src="/static/assets/js/lib/chart-js/Chart.bundle.js"></script>
	<script src="/static/assets/js/lib/chart-js/chartjs-init.js"></script>
	<!-- // Chart js -->


    <script src="/static/assets/js/lib/sparklinechart/jquery.sparkline.min.js"></script><!-- scripit init-->
    <script src="/static/assets/js/lib/sparklinechart/sparkline.init.js"></script><!-- scripit init-->

	<!--  Datamap -->
    <script src="/static/assets/js/lib/datamap/d3.min.js"></script>
    <script src="/static/assets/js/lib/datamap/topojson.js"></script>
    <script src="/static/assets/js/lib/datamap/datamaps.world.min.js"></script>
    <script src="/static/assets/js/lib/datamap/datamap-init.js"></script>
	<!-- // Datamap -->-->
    <script src="/static/assets/js/lib/weather/jquery.simpleWeather.min.js"></script>
    <script src="/static/assets/js/lib/weather/weather-init.js"></script>
    <script src="/static/assets/js/lib/owl-carousel/owl.carousel.min.js"></script>
    <script src="/static/assets/js/lib/owl-carousel/owl.carousel-init.js"></script>
    <script src="/static/assets/js/scripts.js"></script><!-- scripit init-->
    <script src="/static/assets/js/echarts.js"></script>
    <script>
            var chartDom = document.getElementById('mainA');
            var myChart = echarts.init(chartDom);
            var option;
let dashedPic = '';
let color = ['#FF8700', '#ffc300', '#00e473', '#009DFF'];
let chartData = {{ circleData | safe }};
let arrName = [];
let arrValue = [];
let sum = 0;
let pieSeries = [],
    lineYAxis = [];

// 数据处理
chartData.forEach((v, i) => {
    arrName.push(v.name);
    arrValue.push(v.value);
    sum = sum + v.value;
})

// 图表option整理
chartData.forEach((v, i) => {
    pieSeries.push({
        name: '学历',
        type: 'pie',
        clockWise: false,
        hoverAnimation: false,
        radius: [65 - i * 15 + '%', 57 - i * 15 + '%'],
        center: ["30%", "50%"],
        label: {
            show: false
        },
        data: [{
            value: v.value,
            name: v.name
        }, {
            value: sum - v.value,
            name: '',
            itemStyle: {
                color: "rgba(0,0,0,0)"
            }
        }]
    });
    pieSeries.push({
        name: '',
        type: 'pie',
        silent: true,
        z: 1,
        clockWise: false, //顺时加载
        hoverAnimation: false, //鼠标移入变大
        radius: [65 - i * 15 + '%',57 - i * 15 + '%'],
        center: ["30%", "50%"],
        label: {
            show: false
        },
        data: [{
            value: 7.5,
            itemStyle: {
                color: "#E3F0FF"
            }
        }, {
            value: 2.5,
            name: '',
            itemStyle: {
                color: "rgba(0,0,0,0)"
            }
        }]
    });
    v.percent = (v.value / sum * 100).toFixed(1);
    lineYAxis.push({
        value: i,
        textStyle: {
            rich: {
                circle: {
                    color: color[i],
                    padding: [0, 5]
                }
            }
        }
    });
})

option = {
    backgroundColor: '#fff',
    color: color,
    grid: {
        top: '15%',
        bottom: '54%',
        left: "30%",
        containLabel: false
    },
    yAxis: [{
        type: 'category',
        inverse: true,
        axisLine: {
            show: false
        },
        axisTick: {
            show: false
        },
        axisLabel: {
            formatter: function(params) {
                let item = chartData[params];
                console.log(item)
                return '{line|}{circle|●}{name|'+ item.name +'}{bd||}{percent|'+item.percent+'}{value|'+ item.value+'}{unit|元}'
            },
            interval: 0,
            inside: true,
            textStyle: {
                color: "#333",
                fontSize: 14,
                rich: {
                    line: {
                        width: 170,
                        height: 10,
                        backgroundColor: {image: dashedPic}
                    },
                    name: {
                        color: '#666',
                        fontSize: 14,
                    },
                    bd: {
                        color: '#ccc',
                        padding: [0, 5],
                        fontSize: 14,
                    },
                    percent:{
                        color: '#333',
                        fontSize: 14,
                    },
                    value: {
                        color: '#333',
                        fontSize: 16,
                        fontWeight: 500,
                        padding: [0, 0, 0, 20]
                    },
                    unit: {
                        fontSize: 14
                    }
                }
            },
            show: true
        },
        data: lineYAxis
    }],
    xAxis: [{
        show: false
    }],
    series: pieSeries
};
        option && myChart.setOption(option);

    </script>
    <script>
    var chartDom = document.getElementById('mainB');
    var myChart = echarts.init(chartDom);
    var option;
    option = {
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow' ,
                textStyle: {
                    color: '#fff',
                    fontSize: '26'
                },
            }
        },
        legend: {
            top:'5%',
            right:'10%',
            data: ['价格', '香蕉'],
            textStyle:{
                fontSize:12,
                color:'#808080'
            },
            icon:'rect'
        },
        grid: {
            top:60,
            left:50,
            bottom:60,
            right:80
        },
        yAxis: [{
            type: 'category',
            axisTick:{
                show:false
            },
            axisLine:{
                show:false
            },
            axisLabel:{
                color:'#4D4D4D',
                fontSize:14,
                margin:21,
                fontWeight:'bold'
            },
            data: {{ leftXData | safe }},
            position:'right'

        }],
        xAxis: [{
            inverse:true,
            name:'单位：万',
            nameTextStyle:{
                color:'#808080',
                fontSize:12,
                padding:[0, 0, 0, -5]
            },
            max: function(value) {
                if(value.max<5){
                    return 5
                }else{
                    return value.max
                }
            },
            type: 'value',
            axisLine:{
                show:false
            },
            axisLabel:{
                color:'#808080',
                fontSize:12,
                margin:5
            },
            splitLine:{
                show:false
            },
            axisTick:{
                show:false
            }
        }],
        series: [
            {
                name: '猕猴桃',
                type: 'bar',
                label:{
                    show:true,
                    position:'left',
                    fontSize:14,
                    color:'#3DC3F0',
                    fontWeight:'bold'
                },
                barMaxWidth:60,
                itemStyle:{
                    color: {
                        type: 'linear',
                        x: 0,
                        y: 0,
                        x2: 0,
                        y2: 1,
                        colorStops: [{
                            offset: 0, color: '#3DC3F0' // 0% 处的颜色
                        }, {
                            offset: 1, color: '#CCF2FF' // 100% 处的颜色
                        }]
                    }
                },
                data: {{ leftYData | safe }}
            }
        ]
    };

    option && myChart.setOption(option);
    </script>
    <script>
        var chartDom = document.getElementById('mainC');
        var myChart = echarts.init(chartDom);
        var option;

        option = {
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            type: 'shadow' ,
            textStyle: {
                color: '#fff',
                fontSize: '26'
            },
        }
    },
    legend: {
        top:'5%',
        right:'10%',
        data: ['价格', '香蕉'],
        textStyle:{
            fontSize:12,
            color:'#808080'
        },
        icon:'rect'
    },
    grid: {
        top:60,
        left:70,
        bottom:60,
        right:60
    },
    yAxis: [{
        type: 'category',
        axisTick:{
            show:false
        },
        axisLine:{
            show:false
        },
        axisLabel:{
            color:'#4D4D4D',
            fontSize:14,
            margin:21,
            fontWeight:'bold'
        },
        data: {{ rightXData | safe }},

    }],
    xAxis: [{
        name:'单位：万',
        nameTextStyle:{
            color:'#808080',
            fontSize:12,
            padding:[0, 0, 0, -5]
        },
        max: function(value) {
            if(value.max<5){
                return 5
            }else{
                return value.max
            }
        },
        type: 'value',
        axisLine:{
            show:false
        },
        axisLabel:{
            color:'#808080',
            fontSize:12,
            margin:5
        },
        splitLine:{
            show:false
        },
        axisTick:{
            show:false
        }
    }],
    series: [
        {
            name: '香蕉',
            type: 'bar',
                        label:{
                show:true,
                position:'right',
                fontSize:14,
                color:'#3D8BF0',
                fontWeight:'bold'
            },
            barMaxWidth:60,
            itemStyle:{
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0, color: '#3D8BF0' // 0% 处的颜色
                    }, {
                        offset: 1, color: '#CCE2FF' // 100% 处的颜色
                    }]
                }
            },
            data: {{ rightYData | safe }}
        }
    ]
};

    option && myChart.setOption(option);
</script>

</body>
</html>